function [a,len] = PriorityQueue_Add(a,L,item)
%
a(L+1)=item;
len = L+1;
child = len;
parent = bitshift(child,-1);

while (parent>=1) && ( a(parent)< a(child) )
    tmp = a(parent);
    a(parent)=a(child);
    a(child)=tmp;
    
    child = parent;
    parent = bitshift(parent,-1);
    
end